package com.woniuxy.Dao;

import com.firstfactory.Person;
import com.forthfactory.BeanFactory;

public class Main {
    public static void main(String[] args) {
        BeanFactory beanFactory = new BeanFactory();
        Person person= (Person) beanFactory.getBean("japan");
        System.out.println(person);
        person.eat();
        BeanFactory beanFactory1 = new BeanFactory();
        Person person1= (Person) beanFactory1.getBean("japan");
        System.out.println(person1);
        person.eat();
        BeanFactory beanFactory2 = new BeanFactory();
        Person person2= (Person) beanFactory2.getBean("japan");
        System.out.println(person2);
        person.eat();
    }
}
